cmake_minimum_required(VERSION 3.0)
project(helloopengl)

set(CMAKE_CXX_STANDARD 17)

set(DIR_INCLUDES "${PROJECT_SOURCE_DIR}/include")

## copy files
file(COPY src/glsl DESTINATION ./)
file(COPY lib/glfw3.dll DESTINATION ./)

## Imgui
add_library(imgui STATIC
        ${DIR_INCLUDES}/imgui/imgui.cpp
        ${DIR_INCLUDES}/imgui/imgui_impl_glfw.cpp
        ${DIR_INCLUDES}/imgui/imgui_impl_opengl3.cpp
        ${DIR_INCLUDES}/imgui/imgui_draw.cpp
        ${DIR_INCLUDES}/imgui/imgui_demo.cpp
        ${DIR_INCLUDES}/imgui/imgui_tables.cpp
        ${DIR_INCLUDES}/imgui/imgui_widgets.cpp)

add_executable(helloopengl src/glad.c src/me.gl.learn/exception/HelloException.h src/me.gl.learn/exception/HelloAssert.h src/me.gl.learn/Render.cpp src/me.gl.learn/Render.h src/Main.cpp src/Main.h src/me.gl.learn/shader/Shader.cpp src/me.gl.learn/shader/Shader.h src/me.gl.learn/math/Vector3.cpp src/me.gl.learn/math/Vector3.h src/me.gl.learn/math/Angle.h src/me.gl.learn/geometry/Geometry.cpp src/me.gl.learn/geometry/Geometry.h src/me.gl.learn/geometry/Drawable.h src/me.gl.learn/util/ShaderUtil.h src/me.gl.learn/geometry/geometries/Triangle.cpp src/me.gl.learn/geometry/geometries/Triangle.h src/me.gl.learn/geometry/Drawable.cpp src/me.gl.learn/util/ShaderUtil.cpp src/me.gl.learn/util/Log.cpp src/me.gl.learn/util/Log.h src/me.gl.learn/math/Matrix4x4.cpp src/me.gl.learn/math/Matrix4x4.h src/me.gl.learn/util/FileUtil.h src/me.gl.learn/util/FileUtil.cpp src/me.gl.learn/core/String.cpp src/me.gl.learn/core/String.h src/me.gl.learn/geometry/geometries/Cube.cpp src/me.gl.learn/geometry/geometries/Cube.h src/me.gl.learn/math/MatrixN.cpp src/me.gl.learn/math/MatrixN.h src/me.gl.learn/geometry/geometries/Axies.cpp src/me.gl.learn/geometry/geometries/Axies.h src/me.gl.learn/ui/BaseGui.cpp src/me.gl.learn/ui/BaseGui.h src/me.gl.learn/ui/uis/Object3DInfoGui.cpp src/me.gl.learn/ui/uis/Object3DInfoGui.h src/me.gl.learn/constant/Properties.h src/me.gl.learn/core/BufferGeometry.cpp src/me.gl.learn/core/BufferGeometry.h src/me.gl.learn/math/MathUtils.h)
#add_executable(helloopengl src/me.gl.learn/util/Log.cpp src/test/TestMatrix4.cpp src/me.gl.learn/exception/HelloException.h src/me.gl.learn/exception/HelloAssert.h)
INCLUDE_DIRECTORIES(${DIR_INCLUDES})
link_directories(${PROJECT_SOURCE_DIR}/lib)
target_link_libraries(helloopengl  ${PROJECT_SOURCE_DIR}/lib/glfw3.dll imgui)